<?php
Zend_Loader::loadClass('Application_Menu');

class Application_Menu_Preprocessor extends Application_Menu
{
	protected function _init() {
		parent::_init();
		$this->addJavascript("/lib/plugins/jquery.scrollTo.min.js");
		$this->addJavascript("/lib/plugins/jquery.scrollToFixed.min.js");
	}
	
	public function run()
	{
		//$container = new Zend_Navigation($this->_menu);
		//$this->_view->getHelper('navigation')->setContainer($container);
		$this->_view->sidebar = $this->_menu;
	}

	protected function _initNavMenu() {
		return array(
			1 => array(
				'label' => "Simulazione",
				'uri' => "#liv_1",
				'class' => "liv_1",
				'pages' => array(
					1 => array(
						'label' => 'Impostazioni generali',
						'uri' => '#liv_1_1',
						'class' => 'level2 liv_1_1'
					)
				)
			),
			2 => array(
				'label' => "Sito",
				'uri' => "#liv_2",
				'class' => "liv_2",
				'icon' => 'icon-compass',
				'pages'=> array (
					1 => array(
						'label' => "Dati geografici",
						'uri' => "#liv_2_1",
						'class' => 'level2 liv_2_1',
					),
					2 => array(
						'label' => "Dati geomorfologici",
						'uri' => "#liv_2_2",
						'class' => 'level2 liv_2_2',
						/*'pages'=> array (
							1 => array(
								'label' => "Terreno",
								'uri' => "#liv_2_2_1",
								'class' => 'level3 liv_2_2_1',
							),
							2 => array(
								'label' => "Precipitazioni",
								'uri' => "#liv_2_2_2",
								'class' => 'level3 liv_2_2_2',
							),
							//3 => array(
							//	'label' => "Dati green roof",
							//	'uri' => "#liv_2_2_3",
							//	'class' => 'level3',
							//	'style' => 'display: none',
							//)
						)*/
					),
					3 => array(
						'label' =>"Timezone",
						'uri' =>"#liv_2_3",
						'class' => 'level2 liv_2_3',
					),
					4 => array(
						'label' =>"Dati climatici",
						'uri' =>"#liv_2_4",
						'class' => 'level2 liv_2_4',
					),
					/*
					5 => array(
						'label' =>"Dati riscaldamento",
						'uri' =>"#liv_2_5",
						'class' => 'level2',
					),
					6 => array(
						'label' =>"Dati condizionamento",
						'uri' =>"#liv_2_6",
						'class' => 'level2',
					),
					*/
				),
			),
			3 => array(
				'label' => "Edificio",
				'uri' => "#liv_3",
				'class' => 'liv_3',
				'icon' => 'icon-home',
				'pages'=> array (
					1 => array(
						'label' => "Dati di progetto",
						'uri' => "#liv_3_1",
						'class' => 'level2 liv_3_1',
					),
					2 => array(
						'label' => "Tecnico abilitato",
						'uri' => "#liv_3_2",
						'class' => 'level2 liv_3_2',
					),
					3 => array(
						'label' => "Proprietario",
						'uri' => "#liv_3_3",
						'class' => 'level2 liv_3_3',
					),
				)
			),
			4 => array(
				'label' => "Zone",
				'uri' => "#liv_4",
				'class' => 'level2 liv_4',
				'icon' => 'icon-stop',
				'pages'=> array (
					1 => array(
						'label' => "Geometria",
						'uri' => "#liv_4_1",
						'class' => 'level3 liv_4_1',
					),
					2 => array(
						'label' => "Pareti",
						'uri' => "#liv_4_2",
						'class' => 'level3 liv_4_2',
					),
					3 => array(
						'label' => "Porte",
						'uri' => "#liv_4_3",
						'class' => 'level3 liv_4_3',
					),
					4 => array(
						'label' => "Finestre",
						'uri' => "#liv_4_4",
						'class' => 'level3 liv_4_4',
					),
					5 => array(
						'label' => "Pavimenti / Soffitti",
						'uri' => "#liv_4_5",
						'class' => 'level3 liv_4_5',
					),
				),
			),
		);
	}
}
